summaryrefslogtreecommitdiffstats
path: root/Server
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2017-06-09 12:16:31 +0200
committerLukas Pioch <lukas@zgow.de>2017-06-09 12:16:31 +0200
commit3c4e443ddc211b4ecdd2b990a3fa9b12b46efaf6 (patch)
tree51b2547f57ffda8523432cacf10788cedbef352f /Server
parentFixes problems with windows: (diff)
downloadcuberite-3c4e443ddc211b4ecdd2b990a3fa9b12b46efaf6.tar
cuberite-3c4e443ddc211b4ecdd2b990a3fa9b12b46efaf6.tar.gz
cuberite-3c4e443ddc211b4ecdd2b990a3fa9b12b46efaf6.tar.bz2
cuberite-3c4e443ddc211b4ecdd2b990a3fa9b12b46efaf6.tar.lz
cuberite-3c4e443ddc211b4ecdd2b990a3fa9b12b46efaf6.tar.xz
cuberite-3c4e443ddc211b4ecdd2b990a3fa9b12b46efaf6.tar.zst
cuberite-3c4e443ddc211b4ecdd2b990a3fa9b12b46efaf6.zip
Diffstat (limited to 'Server')
-rw-r--r--Server/Plugins/Debuggers/Debuggers.lua12
-rw-r--r--Server/Plugins/Debuggers/Info.lua6
2 files changed, 18 insertions, 0 deletions
diff --git a/Server/Plugins/Debuggers/Debuggers.lua b/Server/Plugins/Debuggers/Debuggers.lua
index 6c47a8a17..0965a17c2 100644
--- a/Server/Plugins/Debuggers/Debuggers.lua
+++ b/Server/Plugins/Debuggers/Debuggers.lua
@@ -2279,6 +2279,18 @@ end
+function HandleConsoleTestErr(a_Split, a_EntireCmd)
+ cRoot:Get():GetDefaultWorld():ForEachEntity(
+ function (a_CBEntity)
+ error("This error should not abort the server")
+ end
+ )
+end
+
+
+
+
+
function HandleConsoleTestJson(a_Split, a_EntireCmd)
LOG("Testing Json parsing...")
local t1 = cJson:Parse([[{"a": 1, "b": "2", "c": [3, "4", 5], "d": true }]])
diff --git a/Server/Plugins/Debuggers/Info.lua b/Server/Plugins/Debuggers/Info.lua
index e3b0beee1..b9eb0eeda 100644
--- a/Server/Plugins/Debuggers/Info.lua
+++ b/Server/Plugins/Debuggers/Info.lua
@@ -350,6 +350,12 @@ g_PluginInfo =
HelpString = "Tests inter-plugin calls with various values"
},
+ ["testerr"] =
+ {
+ Handler = HandleConsoleTestErr,
+ HelpString = "Tests the server's ability to recover from errors in callbacks (GH #3733)",
+ },
+
["testjson"] =
{
Handler = HandleConsoleTestJson,